package com.liqing.movecomment.controller;


import com.liqing.movecomment.annotation.ResponseResult;
import com.liqing.movecomment.util.FileUtils;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;


@Slf4j
@ResponseResult
@Api(tags = "文件上传√")
@RequestMapping("/file")
public class FileUploadController {

    /**
     * 文件上传
     * @param file
     * @return
     */
    @PostMapping("upload")
    public String upload(MultipartFile file) {
        return FileUtils.uploadFile("http://127.0.0.1:9091",file);
    }
}
